nums = [0]
import sys

good_point = len(nums) - 1
if_change = 0


def pro(good_point):
    i = good_point - 1
    j = 1
    if_change = 0
    # 从右向左遍历数组

    while i >= 0:

        if nums[i] >= j:
            good_point = min(good_point, i)
            if_change = 1
        i = i - 1
        j = j + 1
        if good_point == 0:
            print("yes")
            sys.exit(0)
        if if_change == 1:
            return pro(good_point)
    print("no")


pro(good_point)
